package com.example.manpower.Config;

import com.example.manpower.Util.Result;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

@RestControllerAdvice
public class GlobalException {

    @ExceptionHandler(Exception.class)
    public Result allException(Exception e) {
        e.printStackTrace();
        return new Result(505,"全局异常",e.getMessage());
    }

}
